async function async1() {
    await async2()
    // 1
    console.log('async1 end')
    await async2()
    // 3
    console.log('async3 end') 

}
async function async2() {
    console.log('async2 end') 
}
async1()

new Promise(resolve => {
    resolve() // 2微任务
})
.then(function() {
    // 2
    console.log('promise1')
})
.then(function() {
    // 4
    console.log('promise2')
})
// script start => async2 end => Promise => script end => async1 end => promise1 => promise2 => setTimeout
// script start => async2 end => Promise => script end => async1 end => async2 end =》 async3 end=》 promise1 => promise2 => setTimeout
// script start => async2 end => Promise => script end => async1 end => async2 end=》 promise1 =》  async3 end => promise2 => setTimeout
// script start => async2 end => Promise => script end => async1 end => async2 end=》 promise1 => promise2 =》 async3 end => setTimeout